﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Commonality.DAL.MySQL;
using Commonality.DAL.WZS_SFCS;
using Commonality.Model;
using Commonality.Model.PLCControl;
using Commonality.Model.ScanningGunModel;
using Separate.BLL;


namespace WZS_Auto_Classifying_Separate
{
    public partial class DebugForm : Form
    {
        public DebugForm()
        {
            InitializeComponent();
        }

        private void DebugForm_Load(object sender, EventArgs e)
        {

        }

        private void Button1_Click(object sender, EventArgs e)
        {
            SG.EntranceSGA.ScanCodeTimeout(3000);
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            SG.EntranceSGB.ScanCodeTimeout(3000);
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            SG.EntranceSGA.OffScanCode();
        }

        private void Button4_Click(object sender, EventArgs e)
        {
            SG.EntranceSGB.OffScanCode();
        }

        private void Button8_Click(object sender, EventArgs e)
        {
            SG.AloneSGA1.ScanCodeTimeout(3000);
        }

        private void Button7_Click(object sender, EventArgs e)
        {
            SG.AloneSGB1.ScanCodeTimeout(3000);
        }

        private void Button6_Click(object sender, EventArgs e)
        {

        }

        private void Button5_Click(object sender, EventArgs e)
        {

        }

        private void Button20_Click(object sender, EventArgs e)
        {
            //SG.EntranceSGACRCode = textBox1.Text;
            //SG.EntranceSGA_Flag = true;
            //AutoFunction.EntranceQRCodeDispose();
            //bool perm = false;
            //string message = "";
            //ProductCellData ProductCell = new ProductCellData() { usn = "", usnInfo = new string[20], bin = new string[10] };
            //SFCSDataDispose.SFCSControl_Admittance(ref SG.EntranceSGACRCode, ref perm, ref message, ref ProductCell);
            //SFCSDataDispose.ProductCellData_Model(ProductCell, ref EmptyTray.AEmptyTrayModel_BUFF);

            string Values = "";
            string str = SFCSInterface.GetKeyInfoFromView("FPW930684J2MRK8AR", ref Values);
        }

        private void Button9_Click(object sender, EventArgs e)
        {
            //MySqlFunction.PackageOrientation.PackageOrientation_INSERT("liebeskind", 1, "站点异常:调试字段");
            
        }

        private void Button10_Click(object sender, EventArgs e)
        {
            
        }

        private void Button11_Click(object sender, EventArgs e)
        {
            
        }

        private void Button12_Click(object sender, EventArgs e)
        {
            
        }

        private void GroupBox2_Enter(object sender, EventArgs e)
        {

        }

        private void Button14_Click(object sender, EventArgs e)
        {
            
        }

        private void Button13_Click(object sender, EventArgs e)
        {
            
        }

        private void Button15_Click(object sender, EventArgs e)
        {
            
        }

        private void Button16_Click(object sender, EventArgs e)
        {

        }

        private void Button17_Click(object sender, EventArgs e)
        {
            //MainForm.visionWindowA.DispObj();
            //MainForm.visionWindowB.DispObj();

            Log4Net.MsgInfo("CameraA:" + SeparateAutoMain.visionWindowA.Detection());

            Log4Net.MsgInfo("CameraB:" + SeparateAutoMain.visionWindowB.Detection());
        }

        private void Button18_Click(object sender, EventArgs e)
        {
            SG.AloneSGA1RCode = "";
            SG.AloneSGA2RCode = "";
            SG.AloneSGA1.ScanCodeTimeout(SG.Timeout);
            SG.AloneSGA2.ScanCodeTimeout(SG.Timeout);
            SG.AloneSGA1RCode_Flag = true;
            SG.AloneSGA2RCode_Flag = true;
            Log4Net.MsgInfo("A侧分盘扫码");
        }
    }
}
